<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 收藏清单 -->
    <script>
      var peopleIndexes = function (favoriteCompanies) {
        const f = (a1, a2) => a1.length !== a2.length && a1.every(item => a2.includes(item))
        let tmp = []
        for (let i = 0; i < favoriteCompanies.length; i++) {
          tmp.push(i)
          for (let j = 0; j < favoriteCompanies.length; j++) {
            if (f(favoriteCompanies[i], favoriteCompanies[j])) {
              tmp = tmp.filter(item => item !== i)
            }
          }
        }
        return tmp
      }
      console.log(peopleIndexes([['leetcode', 'google', 'facebook'], ['google', 'microsoft'], ['google', 'facebook'], ['google'], ['amazon']]))
    </script>
  </body>
</html>
